import {RouterModule
	// ,
	// CanActivate,
	// CanActivateChild,
	// CanDeactivate
} from "@angular/router";
// CanActivate  激活（进入）拦截,CanActivateChild 子路由激活拦截,CanDeactivate 反激（离开）活拦截
// import {userActiveInter} from "./intercept/route/userActiveInter";

import {UserLoginComponent} from "./user/user-login/user-login.component"
import {UserComponent} from "./user/user.component";
import {AppComponent} from "./app.component";
import {ArticleComponent} from './article/article.component';
import {QuestionComponent} from "./question/question.component";
import {UserRegistComponent} from "./user/user-regist/user-regist.component";
import {UserDetailComponent} from "./user/user-detail/user-detail.component";

export const RoutesConfig=[
    {
		path:'',
		redirectTo:'article',
		pathMatch:'full'
	},
	// {
	// 	path:"login",
	// 	component:UserLoginComponent,
	// 	// ,canActivate:拦截服务    服务继承CanActivate 其他类推 
	// 	// canActivate:[userActiveInter] 
	// },
	//question
	{
		path:"question",
		component:QuestionComponent
		// ,canActivate:拦截服务    服务继承CanActivate 其他类推 
		// canActivate:[userActiveInter] 
	},
	{
		path:"article",
		loadChildren:'./article/article.module#ArticleModule'
		// ,canActivate:拦截服务    服务继承CanActivate 其他类推 
		// canActivate:[userActiveInter] 
	},
	//regust
	// {
	// 	path:"regist",
	// 	component:UserRegistComponent,
	// 	// ,canActivate:拦截服务    服务继承CanActivate 其他类推 
	// 	// canActivate:[userActiveInter] 
	// },
	// 	{
	// 	path:"userDtail",
	// 	component:UserDetailComponent,
	// 	// ,canActivate:拦截服务    服务继承CanActivate 其他类推 
	// 	// canActivate:[userActiveInter] 
	// },
	{
		path:"**",
		redirectTo:'article',
		pathMatch:'full'
	}
]